<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>查询结果</title>
<link href="../../css/style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../js/check.js"></script>
<script language="javascript" src="../../js/checkAll.js"></script>
<script language="javascript" src="../../js/clientSideApp.js"></script>
  <script src="../../bootstrap-3.3.7-dist/js/jquery-3.4.1.min.js"></script>
  <script src="../../layui-v2.5.5/layui/layui.all.js"></script>
  <script src="../../layui-v2.5.5/layui/css/layui.css"></script>
  <link href="../../css/style.css" rel="stylesheet" type="text/css">
  <script language="JavaScript" type="text/javascript" src="../../js/win_center.js"></script>
  <script language="javascript"></script>
<SCRIPT language=JavaScript type=text/JavaScript>

function windowOpen(theURL,winName,features,width,hight,scrollbars,top,left) 
{
  var parameter="top="+top+",left="+left+",width="+width+",height="+hight;
  if(scrollbars=="no")
 {parameter+=",scrollbars=no";}
  else
 {parameter+=",scrollbars=yes";}
  window.open(theURL,winName,parameter);
}
</SCRIPT>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="25" align="center" valign="bottom" class="td06"><table width="98%" border="0" cellspacing="3" cellpadding="0">
      <tr>
        <td width="15"><img src="../../images/index_32.gif" width="9" height="9"></td>
        <td valign="bottom" class="title">药品查询</td>
      </tr>
    </table></td>
  </tr>
</table>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td class="td_page">药品编号：
    <input name="PARA_YM_NOW" size="10" type="text" class="drugid" id="PARA_YM_NOW" next="A001014" alt="查询年月|0|d|||" value="">
药品名称：<input name="PARA_YM_NOW2" size="10" type="text" class="drugname"   id="PARA_YM_NOW2" next="A001014" alt="查询年月|0|d|||" value=""><!--<input type="button"  class="button_select" onClick="fPopUpCalendarDlg('PARA_YM_NOW2')"> -->

<input name="Submit" type="button" class="find" value=" 查询 ">
      <input name="Submit" type="button" class="buttonface005" onClick="javascript:openwindow('adddrugs.html?token='+location.href.split('=')[1],'',500,300)" value="添加药品信息 ">
    </td>
  </tr>
</table>
<br>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0" class="table01">
  <tr>
    <td class="td_top">药品编号</td>
    <td class="td_top">药品名称</td>

    <td class="td_top">药品价格</td>
    <td nowrap class="td_top">药品余量</td>
    <td class="td_top">生产日期</td>
    <td class="td_top">有效期</td>
    <td class="td_top">药品类别</td>
    <td class="td_top">报警值</td>
    <td class="td_top">报日期</td>
    <td class="td_top">库存单位</td>
    <td class="td_top">药房</td>
    <td class="td_top" align="center">操作</td>
  </tr>
  <tr class="_tr02">
    <td class="td07">1103</td>
    <td class="td07">板蓝根</td>

    <td class="td07">10元</td>
    <td class="td07">2000</td>
    <td class="td07">2012-8-10</td>
    <td class="td07">15个月</td>
    <td class="td07">冲剂</td>
    <td class="td07">30</td>
    <td class="td07">2016-3-5</td>
    <td class="td07">箱</td>
    <td class="td07">药房一</td>
    <td align="center" class="td_page"> <input name="Submit" type="button" class="alter" onClick="javascript:openwindow('deletedrugs.html','',500,300)" value="修改药品信息 "></td>
</table>
<table width="95%"  border="0" cellpadding="0" cellspacing="0" class="table02" align="center">
  <tr>
    <td height="30" align="right"><img src="../../images/1.gif" width="4" height="5" align="absmiddle"> 首页　 <img src="../../images/2.gif" width="3" height="5" align="absmiddle"> 上一页　 <img src="../../images/2-2.gif" width="3" height="5" align="absmiddle"> 下一页　 <img src="../../images/3.gif" width="4" height="5" align="absmiddle"> 末页　　共 1 页 1 条记录</td>
  </tr>
</table>
</body>
</html>
<script>

  $(".find").on("click",function () {
alert(location.href.split("=")[1])
      $.ajax({
        url:"/feign/drugStorageController/findDrugInfo",
        type:"get",
        headers: {
          Accept: "application/json; charset=utf-8",
          Authorization: location.href.split("=")[1]
        },
        data:{"drugname":$(".drugname").val(),"drugid":$(".drugid").val()},
        dataType:"json",
        success:function (data) {

          if(data!=null){
            var _tr="    <td class=\"td08\">"+data.drugid+"</td>\n" +
                    "    <td class=\"td07\">"+data.drugname+"</td>\n" +
                    "    <td class=\"td07\">"+data.drugprice+"</td>\n" +
                    "    <td class=\"td07\">"+data.drugnumber+"</td>\n" +
                    "    <td class=\"td07\">"+data.drugdate+"</td>\n" +
                    "    <td class=\"td07\">"+data.dugperiod+"</td>\n" +
                    "    <td class=\"td07\">"+data.drugcategory.druname+"</td>\n" +
                    "    <td class=\"td07\">"+data.drugplival+"</td>\n" +
                    "    <td class=\"td07\">"+data.drugplidate+"</td>\n" +
                    "    <td class=\"td07\">"+data.price.pridunit+"</td>\n" +
                    "    <td class=\"td07\">"+data.pharmacy.phaname+"</td>\n" +
                    "    <td align=\"center\" class=\"td_page\"> <a href='deletedrugs.html?token="+location.href.split('=')[1]+"&drugid="+data.drugid+"&drugname="+data.drugname+"'>修改药品信息</a></td>"
            $("._tr02").html(_tr);

          }else{
            layer.msg("输入的编号或者名称不存在,请重新输入")
          }


        }
      })
  })



  </script>